﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Configuration;
using System.Net.Mail;
namespace PersonalSite.Library
{
    public class Email
    {

        public void Send(Contact contact)
        {
            MailMessage mail = new MailMessage(
                contact.From,
                WebConfigurationManager.AppSettings["myEmail"],
                contact.Subject,
                contact.Message);
            SmtpClient client = new SmtpClient();
            client.EnableSsl = true;
            client.Send(mail);
        }
    }
}